/**
 * 简化的内建主题模式,适用于主体功能一致、部分界面定制的情况
 */

import {createApp} from 'vue'
import {createPinia} from 'pinia'

import ElementPlus from 'element-plus';
import "uno.css";
import './styles/index.scss'

import useInterceptor from './interceptor';

import App from '@/themes/_single/App.vue';
import router from './router'
import {errorHandler} from './error'

import {i18n} from "./i18n"

import TitleBar from "./components/common/TitleBar.vue"

const app = createApp(App)
const store = createPinia()
app.use(ElementPlus)
app.use(store)
app.use(router)
app.use(i18n)
errorHandler(app)

// 全局引入 TitleBar 组件
app.component("TitleBar", TitleBar);

// 执行路由拦截，放在挂载之前的方式（按路由权限标识）
useInterceptor();
app.mount("#app")
